Skip to content

Instantly share code, notes, and snippets.

@rougier
rougier / fractal-dimension.py
Last active May 17, 2024 13:16
Fractal dimension computing
# -----------------------------------------------------------------------------
# From https://en.wikipedia.org/wiki/Minkowski–Bouligand_dimension:
#
# In fractal geometry, the Minkowski–Bouligand dimension, also known as
# Minkowski dimension or box-counting dimension, is a way of determining the
# fractal dimension of a set S in a Euclidean space Rn, or more generally in a
# metric space (X, d).
# -----------------------------------------------------------------------------
import scipy.misc
import numpy as np
@sts10
sts10 / rust-command-line-utilities.markdown
Last active May 17, 2024 13:15
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@g-berthiaume
g-berthiaume / Useful GCC Compiler Options.md
Created December 31, 2018 18:27
A useful list of gcc compiler options

Useful GCC Compiler Options

A non exhaustive list of gcc compiler options.

$ gcc myprog.c -o myprog -Wall -Wextra -pedantic -std=c11 [...]

Optimization:

@JacquesDuflos
JacquesDuflos / mangakatana_cbz_creater
Last active May 17, 2024 13:14
Makes cbz files for each chapter of a manga downloaded form mangakatana.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import zipfile
'''
this script is ment to turn .zip files downloaded from mangakatana.com to a serie
of .cbz files. The .zip files contain usually 10 chapters of a same manga stored as
a serie of folders.
'''
@MawKKe
MawKKe / cmake-cxx-mold-linking-howto.md
Last active May 17, 2024 13:13
How to try out the new "mold" linker with your CMake C/C++ project

How to try out the new mold linker with your CMake C/C++ project

Here is a quick how-to if you want to try out the new (supposedly fast) C/C++ linker https://github.com/rui314/mold

In this document I used Ubuntu-22.04 docker container with

  • GCC version 11.2.0
  • Clang version 14.0.0

1. Install mold :

@htruong
htruong / chroot-to-pi.sh
Last active May 17, 2024 13:12
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@ruffsl
ruffsl / chroot-to-pi.sh
Last active May 17, 2024 13:12 — forked from htruong/chroot-to-pi.sh
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued